<!--受理详情-->
<style lang="less" scoped>
.app-class {
  .dt-head-fix {
    top: 0px;
  }
}
.dt-head {
  height: 137px;
}
</style>

<template>

  <div class="contain">
    <div class="dt-head">
      <div class="dt-head-fix">
        <template>
          <detail-header :id="todolist"></detail-header>
        </template>
      </div>
    </div>

    <div class="detail-tab-lft" v-if="tab">
      <div class="detail-supply">
        <i class="iconfont icon-supplier ft17"></i>
        {{tododetail.length>0?tododetail[0].suppliername:''}}
      </div>
      <div class="detail-goods-list">
        <div class="displayflex list-goods-warp" v-for="item in tododetail">
          <div class="pic">
            <img :src="item.PictContent | filterImgUrl">
          </div>
          <div class="msg flex1">
            <p class="ft17">{{item.goodsname}}</p>
            <p>{{item.goodsspec}}</p>
            <p>{{item.productor}}</p>
            <em class="def-color">共
              <span class="red">{{item.poqty}}</span>
              {{item.unit}}
            </em>
          </div>
        </div>
        <p class="detail-mark ft17" v-if="todolist.Memo">
          <em class="ft17">备注留言：</em>
          <i class="gray">{{todolist.Memo}}</i>
        </p>
        <div class="detail-num">
          <em >共{{todolist.length}}种商品</em>小计:
          <span class="red">￥{{(amount || todolist.detailmoneysum) | fmoney}}</span>
        </div>
      </div>
      <div class="detail-bottom displayflex">
        <span>合计：
          <em class="red">￥{{(amount || todolist.detailmoneysum) | fmoney}}</em>
        </span>
      </div>
    </div>
  </div>
</template>

<script>
import detailHeader from "@/components/core/header/detail_header.vue";
import feedBack from "@/components/share/billfb/billfb.vue";
import voiceMsg from "@/components/share/voiceMsg/voicemsg.vue";
import appHeader from "@/components/core/header/app_header.vue";
export default {
  name: "acceptDetail",
  components: {
    appHeader,
    detailHeader,
    feedBack,
    voiceMsg
  },
  data() {
    return {
      tab: true,
      tododetail: [],
      todolist: [],
      popupVisible: false,
      ua: navigator.userAgent.toLowerCase(),
      shares: null,
      isApp: false
    };
  },
  computed: {
    amount() {
      var total = 0;
      for (var i = 0; i < this.tododetail.length; i++) {
        total = total + this.tododetail[i].Amount;
      }
      return total;
    },
    guid() {
      return this.$route.query.id;
    },
    userinfo() {
      return JSON.parse(localStorage.userinfo);
    }
  },
  created() {
    this.getDate();
  },
  mounted() {},
  methods: {
    //获取详情
    getDate() {
      let query = {
        billno: this.$route.query.Guid
      };
      this.Ajax.post("wxh/order/getHosPlanAndSonOrder", query).then((resp) => {
        if (resp.errorCode == 0) {
          this.tododetail = resp.data.sonlist;
          this.todolist = resp.data.hosinfo;
        } else {
          this.Toast({
            message: resp.message || "操作异常，请稍后重试"
          });
        }
      });
    }
  }
};
</script>